package cn.sxt.controller;

import cn.sxt.entities.CommonResult;
import cn.sxt.entities.Payment;
import cn.sxt.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/4/28 11:50
 */
@RestController
@Slf4j
public class OrderFeignController {
    @Resource
    private PaymentFeignService paymentFeignService;
    @GetMapping(value = "/feign/consumer/payment/find/{id}")
    public CommonResult<Payment> findPaymentById(@PathVariable Long id){
        return paymentFeignService.findPaymentById(id);
    }

    @GetMapping(value = "/feign/consumer/payment/feign/timeout")
    public String paymentFeignTimeout(){
        return paymentFeignService.paymentFeignTimeout();
    }
}
